package com.miya.archetype.web.admin.controller;

import com.alipay.sofa.runtime.api.annotation.SofaReference;
import com.miya.archetype.biz.home.manager.TradeManager;
import com.miya.archetype.core.model.TradeModel;
import com.miya.archetype.web.admin.vo.TradeVO;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/trade")
public class TradeController {

    @SofaReference
    private TradeManager tradeManager;

    @RequestMapping("/getById")
    public TradeVO getById(long id) {

        TradeVO tradeVO = new TradeVO();
        TradeModel tradeModel = tradeManager.getById(id);
        tradeVO.setId(tradeModel.getId());
        return tradeVO;
    }
}

